3.43 \(\int \frac{\left (d+e x^n\right )^2}{a+c x^{2 n}} \, dx\)

Optimal. Leaf size=107 \[ \frac{x \left (c d^2-a e^2\right ) \, _2F_1\left (1,\frac{1}{2 n};\frac{1}{2} \left (2+\frac{1}{n}\right );-\frac{c x^{2 n}}{a}\right )}{a c}+\frac{2 d e x^{n+1} \, _2F_1\left (1,\frac{n+1}{2 n};\frac{1}{2} \left (3+\frac{1}{n}\right );-\frac{c x^{2 n}}{a}\right )}{a (n+1)}+\frac{e^2 x}{c} \]

[Out]

(e^2*x)/c + ((c*d^2 - a*e^2)*x*Hypergeometric2F1[1, 1/(2*n), (2 + n^(-1))/2, -((
c*x^(2*n))/a)])/(a*c) + (2*d*e*x^(1 + n)*Hypergeometric2F1[1, (1 + n)/(2*n), (3
+ n^(-1))/2, -((c*x^(2*n))/a)])/(a*(1 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.197116, antiderivative size = 107, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19 \[ \frac{x \left (c d^2-a e^2\right ) \, _2F_1\left (1,\frac{1}{2 n};\frac{1}{2} \left (2+\frac{1}{n}\right );-\frac{c x^{2 n}}{a}\right )}{a c}+\frac{2 d e x^{n+1} \, _2F_1\left (1,\frac{n+1}{2 n};\frac{1}{2} \left (3+\frac{1}{n}\right );-\frac{c x^{2 n}}{a}\right )}{a (n+1)}+\frac{e^2 x}{c} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x^n)^2/(a + c*x^(2*n)),x]

[Out]

(e^2*x)/c + ((c*d^2 - a*e^2)*x*Hypergeometric2F1[1, 1/(2*n), (2 + n^(-1))/2, -((
c*x^(2*n))/a)])/(a*c) + (2*d*e*x^(1 + n)*Hypergeometric2F1[1, (1 + n)/(2*n), (3
+ n^(-1))/2, -((c*x^(2*n))/a)])/(a*(1 + n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 19.2901, size = 104, normalized size = 0.97 \[ \frac{d^{2} x{{}_{2}F_{1}\left (\begin{matrix} 1, \frac{1}{2 n} \\ \frac{n + \frac{1}{2}}{n} \end{matrix}\middle |{- \frac{c x^{2 n}}{a}} \right )}}{a} + \frac{2 d e x^{n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, \frac{n + 1}{2 n} \\ \frac{3 n + 1}{2 n} \end{matrix}\middle |{- \frac{c x^{2 n}}{a}} \right )}}{a \left (n + 1\right )} + \frac{e^{2} x^{2 n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, \frac{n + \frac{1}{2}}{n} \\ 2 + \frac{1}{2 n} \end{matrix}\middle |{- \frac{c x^{2 n}}{a}} \right )}}{a \left (2 n + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((d+e*x**n)**2/(a+c*x**(2*n)),x)

[Out]

d**2*x*hyper((1, 1/(2*n)), ((n + 1/2)/n,), -c*x**(2*n)/a)/a + 2*d*e*x**(n + 1)*h
yper((1, (n + 1)/(2*n)), ((3*n + 1)/(2*n),), -c*x**(2*n)/a)/(a*(n + 1)) + e**2*x
**(2*n + 1)*hyper((1, (n + 1/2)/n), (2 + 1/(2*n),), -c*x**(2*n)/a)/(a*(2*n + 1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.122424, size = 107, normalized size = 1. \[ \frac{x \left ((n+1) \left (c d^2-a e^2\right ) \, _2F_1\left (1,\frac{1}{2 n};1+\frac{1}{2 n};-\frac{c x^{2 n}}{a}\right )+e \left (2 c d x^n \, _2F_1\left (1,\frac{n+1}{2 n};\frac{1}{2} \left (3+\frac{1}{n}\right );-\frac{c x^{2 n}}{a}\right )+a e (n+1)\right )\right )}{a c (n+1)} \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x^n)^2/(a + c*x^(2*n)),x]

[Out]

(x*((c*d^2 - a*e^2)*(1 + n)*Hypergeometric2F1[1, 1/(2*n), 1 + 1/(2*n), -((c*x^(2
*n))/a)] + e*(a*e*(1 + n) + 2*c*d*x^n*Hypergeometric2F1[1, (1 + n)/(2*n), (3 + n
^(-1))/2, -((c*x^(2*n))/a)])))/(a*c*(1 + n))

_______________________________________________________________________________________

Maple [F]  time = 0.088, size = 0, normalized size = 0. \[ \int{\frac{ \left ( d+e{x}^{n} \right ) ^{2}}{a+c{x}^{2\,n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((d+e*x^n)^2/(a+c*x^(2*n)),x)

[Out]

int((d+e*x^n)^2/(a+c*x^(2*n)),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \frac{e^{2} x}{c} + \int \frac{2 \, c d e x^{n} + c d^{2} - a e^{2}}{c^{2} x^{2 \, n} + a c}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2/(c*x^(2*n) + a),x, algorithm="maxima")

[Out]

e^2*x/c + integrate((2*c*d*e*x^n + c*d^2 - a*e^2)/(c^2*x^(2*n) + a*c), x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{e^{2} x^{2 \, n} + 2 \, d e x^{n} + d^{2}}{c x^{2 \, n} + a}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2/(c*x^(2*n) + a),x, algorithm="fricas")

[Out]

integral((e^2*x^(2*n) + 2*d*e*x^n + d^2)/(c*x^(2*n) + a), x)

_______________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d+e*x**n)**2/(a+c*x**(2*n)),x)

[Out]

Exception raised: TypeError

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (e x^{n} + d\right )}^{2}}{c x^{2 \, n} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2/(c*x^(2*n) + a),x, algorithm="giac")

[Out]

integrate((e*x^n + d)^2/(c*x^(2*n) + a), x)